package com.ruizhong.PIW.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruizhong.PIW.dao.TTableOperationMapper;
import com.ruizhong.PIW.entity.TTableOperation;
import com.ruizhong.PIW.service.OperationService;
import com.ruizhong.PIW.utils.Result;
import com.ruizhong.PIW.utils.ResultCode;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class OperationServiceImpl extends ServiceImpl<TTableOperationMapper, TTableOperation> implements OperationService {
    @Override
    public Result getOperationByTitle(Integer tableId) {
        List<TTableOperation> ops = lambdaQuery()
                .eq(TTableOperation::getTableId, tableId)
                .orderByAsc(TTableOperation::getId)
                .list();
        return new Result(ResultCode.success,null,ops);
    }
}
